//
//  ViewController.m
//  TestForOC
//
//  Created by 王昊 on 2020/9/14.
//  Copyright © 2020 Test. All rights reserved.
//

#import "ViewController.h"
#import <objc/runtime.h>

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self run];
//    [self run2];
//    [self run3];
    
    
    dispatch_queue_t queue = dispatch_get_global_queue(0, 0);
    dispatch_async(queue, ^{
        for (int i = 0;  i<5; i++) {
            NSLog(@"%@ ---- %d",[NSThread currentThread],i);
        }
    });
    
    dispatch_async(queue, ^{
        for (int i = 0;  i<5; i++) {
            NSLog(@"%@ ---- %d",[NSThread currentThread],i);
        }
    });
}

- (void)run{
    NSLog(@"run");
}

- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector{
    if ([self respondsToSelector:aSelector]) {
        return [super methodSignatureForSelector:aSelector];
    }
    return [NSMethodSignature signatureWithObjCTypes:"v@:"];
}

- (void)forwardInvocation:(NSInvocation *)anInvocation{
    NSLog(@"找不到%@方法",NSStringFromSelector(anInvocation.selector));
}

- (void)loadNews:(NSDictionary *)params success:(void(^)(NSArray *newsData))success failure:(void(^)(NSArray *error))failure{
    
}

@end
